home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20020314-20021006 / 000379_fdc@columbia.edu_Wed Sep 18 14:05:37 EDT 2002.msg < prev    next >
Text File  |  2020-01-01  |  2KB  |  50 lines

  1. Article: 13713 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
  3. From: fdc@columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Re: Multiple line IF statement?
  6. Date: 18 Sep 2002 14:05:28 -0400
  7. Organization: Columbia University
  8. Lines: 33
  9. Message-ID: <amaf98$es6$1@watsol.cc.columbia.edu>
  10. References: <amadkm$8bh$1@msunews.cl.msu.edu>
  11. NNTP-Posting-Host: watsol.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1032372331 8046 128.59.39.139 (18 Sep 2002 18:05:31 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 18 Sep 2002 18:05:31 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13713
  16.  
  17. In article <amadkm$8bh$1@msunews.cl.msu.edu>,
  18. Robert Gibbens <rgibbens@redskytech.com> wrote:
  19. : Is it possible in C-Kermit (Kermit 95, Win2k), to do multiple line IF
  20. : statements?
  21. Sure.
  22.  
  23. : For example, if I encounter a failure, I would like to write the failure to
  24. : my log file and then exit.  When I try this....
  25. :             if > \%a \%b -
  26. :                  WRITE File \v(exitstatus) \v(date) \v(time) \%s FAILED
  27. : after \%a tries, end 1
  28. : ....it simply writes the whole line to the log file and then continues
  29. : running the script.  I would like the "end 1" to execute also
  30.  
  31. As described in the manual (second edition) and shown in the many sample
  32. scripts in our script library:
  33.  
  34.   http://www.columbia.edu/kermit/ckscripts.html
  35.  
  36. if > \%a \%b {
  37.     WRITE File \v(exitstatus) \v(date) \v(time) \%s FAILED after \%a tries
  38.     end 1
  39. }
  40.  
  41. You can also have an ELSE part, and you can nest them, etc.  For details
  42. about improved IF command syntax, see:
  43.  
  44.   http://www.columbia.edu/kermit/ckermit70.html#x7.20
  45.  
  46. - Frank
  47.